<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>中国福利彩票</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">

<!--页面样式-->
<link rel="stylesheet" type="text/css" href="css/style.css" />

<script src="js/jquery-1.7.2.min.js"></script>
<style>
#infoList li{height:1.7rem;}
#infoList li a{position:relative;} 
#infoList li a span:nth-child(2){position:absolute;left:0px;top:0.6rem;color:#999;font-size:0.35rem;}
#infoList li a span:nth-child(3){color:#999999;position:absolute;right:0px;top:0.2rem;font-size:0.5rem;padding:0rem}
</style>
</head>
<body  style="width:10rem !important; margin:0 auto">
<script>
/*取设备宽度*/
	function rem(){
	var iWidth=document.documentElement.getBoundingClientRect().width;
	iWidth=iWidth>640?640:iWidth;
	document.getElementsByTagName("html")[0].style.fontSize=iWidth/10+"px";
	};
	rem();
	window.onorientationchange=window.onresize=rem      
</script>

    <div class="Header">
<!--     	<div class="left H_logot"><a href="MemberCenter.html"><img src="images/Nimg5.png"></a></div> -->
        <div class="left H_content text-center font28 cfffff">资金流水查询</div>
        <div class="right H_right text-right font24"><a href="MemberCenter.html"><img src="images/Nimg4.png"></a></div>
        <div class="clear"></div>
    </div>
    
    <div class="XZL_big font28 c999999 Arial">
    	<ul id="infoList">
<!--          	<li><a href="XzjlsDetailed.html"><span class="c333333 Weiruan"><img src="images/Xlimg2.png">充值</span><span class="font24 c666666 right">2016-04-08 10:30:55</span><span>200元</span></a></li> -->
        </ul>
       	<div id="addMore"><span onclick="getMoreInfo()" style="font-size: 0.35rem;margin-left: 36%;">点击加载更多</span></div>
       	<div id="loading" style="display: none;"><span  style="font-size: 0.35rem;margin-left: 45%;">正在加载·······</span></div>
       	<div id="noMore" style="display: none;"><span  style="font-size: 0.35rem;margin-left: 27%;">已经为您展示全部信息</span></div>
    </div>

</body>
<script src="js/jsCallCookies.js"></script>
<script src="js/common.js"></script>
<script type="text/javascript">
var accountId="";
	jQuery(document).ready(function($) {
		accountId = getCookie("accountId");
		getInfoList(null,"");
	});
	//点击加载更多信息
	function getMoreInfo(){
		$('#addMore').hide();
		$('#loading').show();
		$('#noMore').hide();
		var previousTransactionId = "";//翻页最后一行的transactionId---因为APP翻页只能向下翻
		str = $("ul li:last-child").map(function(){     // 获取最后一个锂元素的内容
			previousTransactionId = $(this).text().split("@@")[1];
            return previousTransactionId;
        }).get().join(',');
		getInfoList(1,previousTransactionId);
	}
	//获得信息列表
	function getInfoList(pagetype,previousTransactionId){
		 var para = {
 			  	accountId:accountId,
				pagetype:pagetype,
				previousTransactionId:previousTransactionId,
 	        };
 		
 		$.ajax({
 			url : "../../api/accountSystem/accountFlowDetail",
 			async:false,
 			type : "POST",
 			herder:{
 				'Accept':'application/json',
 				'Content-Type':'application/json'
 			},
 			dataType:"json",
 			contentType:"application/json",
 			data: JSON.stringify(para),
 			error:function(XMLHttpRequest, textStatus, errorThrown){
 				alert(errorThrown);
 			},
 			success: function(data, textStatus){
 			if(data.success == true){
 				if(data.accountflow.length==0){
						$('#addMore').hide();
						$('#loading').hide();
						$('#noMore').show();
				 	}else{
				 		 for(var i=0;i<data.accountflow.length;i++){
							 if(data.accountflow[i].type==1){
								$('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/Xlimg2.png\">充值</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==2){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">提现</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==3){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/Xlimg2.png\">冻结</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==4){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/Xlimg2.png\">解冻</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==5){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/Xlimg2.png\">投注</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==6){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">返奖至资金帐户</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==7){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">返奖至借记卡</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }else if(data.accountflow[i].type==8){
								 $('#infoList').append("<li><a href=\"#\"><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">资金冲正</span><span class=\"font24 c666666 right\">"+getLocalTime(data.accountflow[i].createTime,'yyyy-MM-dd HH:mm:ss')+"</span><span>"+data.accountflow[i].amount+"元</span></a><span style='display:none'>@@"+data.accountflow[i].transactionId+"</span></li>");
							 }
						 }
						$('#addMore').show();
						$('#loading').hide();
						$('#noMore').hide();
				 	}
						
 				}else{
 					window.location.assign(encodeURI('XzjlsDown.html?description='+data.description+''));
 					return;
 				}
 			}		
 		});

// 				var data = "{\"description\":\"success\",\"retObj\":[{\"transactionId\":\"23456789rtyui\",\"type\":2,\"amount\":10000,\"flwoDes\":\"操作成功\",\"createTime\":1403149534},{\"transactionId\":\"23456789rtyui\",\"type\":1,\"amount\":20000,\"flwoDes\":\"操作成功\",\"createTime\":1403149534}],\"success\":true}";
//  				 data = eval("("+data+")"); 
//  				 if(data.retObj.length==0){
//  						$('#addMore').hide();
// 						$('#loading').hide();
// 						$('#noMore').show();
 					
//  				 }else{
//  					 for(var i=0;i<data.retObj.length;i++){
//  	 					 if(data.retObj[i].type==1){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/Xlimg2.png\">充值</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==2){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">提现</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==3){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">冻结</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==4){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">解冻</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==5){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">投注</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==6){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">返奖至资金帐户</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==7){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">返奖至借记卡</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }else if(data.retObj[i].type==8){
//  	 						$('#infoList').append("<li><a href=\"#\"><em class=\"font24 c666666 right\">"+new Date(data.retObj[i].createTime * 1000).getFullYear()+'-'+new Date(data.retObj[i].createTime * 1000).getMonth()+'-'+new Date(data.retObj[i].createTime * 1000).getDate()+"</em><span class=\"c333333 Weiruan\"><img src=\"images/XLimg3.png\">资金冲正</span>"+data.retObj[i].amount+"元</a><span style='display:none'>@@"+data.retObj[i].transactionId+"</span></li>");
//  	 					 }
//  	 				 }
//  	 					$('#addMore').show();
//  						$('#loading').hide();
//  						$('#noMore').hide();
//  				 }
 				

	}
</script>
</html>
